-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-53957][Geo][SQL] Support GEOGRAPHY and GEOMETRY in the SpatialReferenceSystemMapper #52667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
uros-db
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mkaravel @szehon-ho Please review.
...rc/main/scala/org/apache/spark/sql/internal/types/CartesianSpatialReferenceSystemMapper.java
Outdated
Show resolved
Hide resolved
...rc/main/scala/org/apache/spark/sql/internal/types/CartesianSpatialReferenceSystemMapper.java
Outdated
Show resolved
Hide resolved
...c/main/scala/org/apache/spark/sql/internal/types/GeographicSpatialReferenceSystemMapper.java
Outdated
Show resolved
Hide resolved
...c/main/scala/org/apache/spark/sql/internal/types/GeographicSpatialReferenceSystemMapper.java
Outdated
Show resolved
Hide resolved
sql/api/src/main/scala/org/apache/spark/sql/internal/types/SpatialReferenceSystemCache.java
Outdated
Show resolved
Hide resolved
mkaravel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing the review comments.
LGTM.
|
@cloud-fan Please review. |
|
@cloud-fan This one should be good to go. |
sql/api/src/main/scala/org/apache/spark/sql/internal/util/SingletonBase.java
Outdated
Show resolved
Hide resolved
...pi/src/main/scala/org/apache/spark/sql/internal/types/SpatialReferenceSystemInformation.java
Outdated
Show resolved
Hide resolved
|
thanks, merging to master! |
…ReferenceSystemMapper ### What changes were proposed in this pull request? Extend the `SpatialReferenceSystemMapper` class to offer SRID <-> CRS mappings for both `GeographyType` and `GeometryType`. The `SpatialReferenceSystemMapper` class was introduced originally as part of: apache#52491. ### Why are the changes needed? Avoid manual checks for GEOGRAPHY type, and use the centralized SRS mapping logic. Also, this PR will make it easier to support additional SRID/CRS values for spatial types soon. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added new tests to: - `SpatialReferenceSystemMapperSuite` ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#52667 from uros-db/geo-srsMapper. Authored-by: Uros Bojanic <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
…n PySpark ### What changes were proposed in this pull request? Implement the Spatial Reference System Mapper classes to offer SRID <-> CRS mappings in PySpark, for both `GeographyType` and `GeometryType`. On JVM / Scala side, the `SpatialReferenceSystemMapper` class was introduced originally as part of: #52491, and then subsequently extended in: #52667. ### Why are the changes needed? Use centralized SRS mapping logic in PySpark, same as we currently do in Scala types. Also, this PR will make it easier to support additional SRID/CRS values for spatial types soon. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Updated tests in: - `test_geographytype` - `test_geometrytype` ### Was this patch authored or co-authored using generative AI tooling? No. Closes #52799 from uros-db/geo-srsMapper-python. Authored-by: Uros Bojanic <[email protected]> Signed-off-by: Ruifeng Zheng <[email protected]>
What changes were proposed in this pull request?
Extend the
SpatialReferenceSystemMapperclass to offer SRID <-> CRS mappings for bothGeographyTypeandGeometryType.The
SpatialReferenceSystemMapperclass was introduced originally as part of: #52491.Why are the changes needed?
Avoid manual checks for GEOGRAPHY type, and use the centralized SRS mapping logic.
Also, this PR will make it easier to support additional SRID/CRS values for spatial types soon.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Added new tests to:
SpatialReferenceSystemMapperSuiteWas this patch authored or co-authored using generative AI tooling?
No.